import request from '../utils/request.js'

// 获取用户信息
export const userInfo = () => {
  return request.post('/ucenter/getUser')
}

// 修改头像
export const updatePicture = (data) => {
  return request.post('/ucenter/updatepicture?file='+data)
}

// 修改昵称
export const updateNickname = (data) => {
  return request.post('/ucenter/updateNickname?nickname='+data)
}

// 修改用户信息
export const editInfo = (data) => {
  return request.post('/user/save',data)
}

// 反馈
export const feedback = (data) => {
  return request.post('/feedback/add',data)
}

// 获取我的收藏列表
export const getMyCollectList = (data) => {
  return request.get('/user/getMyCollectList', data)
}

// 获取我的收藏列表取消收藏文章
export const unMyEnrollList = (data) => {
  return request.post('/user/collect/cancelarticle', data)
} 
// 获取我的活动列表
export const getMyEnrollList = (data) => {
  return request.get('/user/getMyEnrollList', data)
}